package com.chenjie.executor.day17;

/**
 * packageName com.chenjie.executor.day17
 *
 * @author chenjie
 * @version JDK 8
 * @className LockA (此处以class为例)
 * @date 2024/5/29
 * @description TODO
 */
public class LockA implements Runnable {
    @Override
    public void run() {
        printA();
    }

    public static synchronized void printA(){
        try {
            Thread.sleep(1000L);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("a");
        LockB.printB();
    }
}
